import { api } from '../utils/apiWrapper.js'

// 获取项目问题列表
export function getProjectIssueList(params) {
  return api.get('/api/data/project_issues', params)
}
export async function getProjectIssueListByProjectId(params) {
  //var params={page:page,pageSize:pageSize ,where: `project_id:${project_id}`}
  return await getProjectIssueList(params)
}

// 获取单个项目问题
export function getProjectIssueById(id) {
  return api.get(`/api/data/project_issues/${id}`)
}

// 创建项目问题
export function createProjectIssue(data) {
  return api.post('/api/data/project_issues', data)
}

// 更新项目问题
export function updateProjectIssue(id, data) {
  return api.put(`/api/data/project_issues/${id}`, data)
}

// 删除项目问题
export function deleteProjectIssue(id) {
  return api.delete(`/api/data/project_issues/${id}`)
} 